<?php
class Form_Place extends Zend_Form {
     public function init() {
     parent::init();
     $this->setAction('/place/add');
     $this->setMethod('post');
     $this->setAttrib('class', 'place');

     $title = new Zend_Form_Element_Text('title', array(
         'required'    => true,
         'label'       => 'Title:',
         'maxlength'   => '30',
         'validators'  => array(
             array('Alnum', true, array(true)),
             array('StringLength', true, array(0, 30))
          ),
         'filters'     => array('StringTrim'),
     ));
     $this->addElement($title);
     
     $image1 = new Form_Element_Image('image1');
     $image1->setLabel('Image 1:');
     $this->addElement($image1);

     $image2 = new Form_Element_Image('image2');
     $image2->setLabel('Image 2:');
     $this->addElement($image2);
     
     $image3 = new Form_Element_Image('image3');
     $image3->setLabel('Image 3:');
     $this->addElement($image3);
     
     $image4 = new Form_Element_Image('image4');
     $image4->setLabel('Image 4:');
     $this->addElement($image4);
     
     $location = new Form_Element_Location('location');
     $this->setAttrib('required', true);
     $this->addElement($location);

     $submit = new Zend_Form_Element_Submit('submit', array(
         'label'       => 'Save',
     ));      
     $this->addElement($submit);

     $this->addDisplayGroup(
         array('title', 'location', 'image1', 'image2', 'image3', 'image4', 'submit'), 'placeDataGroup',
         array(
             'legend' => 'Place'
         )
     );
    }
}